#!/bin/bash

while read line; do
	pval=${line#*playTime>}
	val=${pval%</playTime>*}
	if [ "x$val" != "x$line" -a "x$val" != "x$pval" ]; then playTime=$val; fi

	pval=${line#*fontsize=\"}
	val=${pval%\" color=*}
	if [ "x$val" != "x$line" -a "x$val" != "x$pval" ]; then fontsize=$val; fi

	pval=${line#*color=\"}
	val=${pval%\" mode=*}
	if [ "x$val" != "x$line" -a "x$val" != "x$pval" ]; then color=$val; fi

	pval=${line#*mode=\"}
	val=${pval%\"><\![CDATA*}
	if [ "x$val" != "x$line" -a "x$val" != "x$pval" ]; then mode=$val; fi

	pval=${line#*CDATA[}
	val=${pval%]]></message>*}
	if [ "x$val" != "x$line" -a "x$val" != "x$pval" ]; then message=$val; fi

	pval=${line#*times>}
	val=${pval%</times>*}
	if [ "x$val" != "x$line" ]; then times=$val; fi

	val=${line#*</data>}
	if [ "x$val" != "x$line" ]; then
		echo -e "playTime: $playTime\nfontsize: $fontsize\ncolor: $color\nmode: $mode\nmessage: $message\ntimes: $times\nalpha: 100\n"
	fi
done
